home *** CD-ROM | disk | FTP | other *** search
- (*----------------------------------------------------------------------*)
- (* Skip_To_Line --- Skips to specified line in file F *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Skip_To_Line( n: REAL );
-
- (*----------------------------------------------------------------------*)
- (* *)
- (* Procedure: Skip_To_Line *)
- (* *)
- (* Purpose: Skips forward to specified line on file F. *)
- (* *)
- (* Calling sequence: *)
- (* *)
- (* Skip_To_Line( n: REAL ); *)
- (* *)
- (* n --- line to skip to *)
- (* *)
- (* Calls: Readln_F *)
- (* *)
- (* Remarks: *)
- (* *)
- (* Line n must exist. File F must also be positioned at or *)
- (* before line n. On exit file F is positioned at line n. *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- BEGIN (* Skip_To_Line *)
-
- WHILE ( Cur_line < n ) DO
- Readln_F;
-
- END (* Skip_To_Line *);
-
- (*----------------------------------------------------------------------*)
- (* Skip_To_Page --- Skips to specified page in file F *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Skip_To_Page( n: REAL );
-
- (*----------------------------------------------------------------------*)
- (* *)
- (* Procedure: Skip_To_Page *)
- (* *)
- (* Purpose: Skips forward to specified page on file F. *)
- (* *)
- (* Calling sequence: *)
- (* *)
- (* Skip_To_Page( n: REAL ); *)
- (* *)
- (* n --- page to skip to *)
- (* *)
- (* Calls: Readln_F *)
- (* *)
- (* Remarks: *)
- (* *)
- (* Page n must exist. File F must also be positioned at or *)
- (* before the first line of page n. On exit file F is positioned *)
- (* at the first line of page n. *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- BEGIN (* Skip_To_Page *)
-
- WHILE ( Cur_page < n ) DO
- Readln_F;
-
- END (* Skip_To_Page *);
-
- (*----------------------------------------------------------------------*)
- (* Scan_to_Eof -- Scan forward to end of file on F *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Scan_To_Eof;
-
- (*----------------------------------------------------------------------*)
- (* *)
- (* Procedure: Scan_To_Eof *)
- (* *)
- (* Purpose: Skips forward to end of file on file F. *)
- (* *)
- (* Calling sequence: *)
- (* *)
- (* Scan_To_Eof; *)
- (* *)
- (* Calls: Readln_F *)
- (* Reset_F *)
- (* *)
- (* Remarks: *)
- (* *)
- (* On entry Eof_Seen = FALSE. On exit Eof_Seen = TRUE, Max_Line = *)
- (* the largest line number on the file, and Max_Page = the largest *)
- (* page number on the file. On exit F is also reset. This *)
- (* routine is called for large forward skips by the Find_Line and *)
- (* Find_Page routines. It is called AT MOST ONCE per run of *)
- (* PibList. *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- BEGIN (* Scan_To_Eof *)
-
- WHILE NOT EOF( F ) DO
- Readln_F;
-
- Eof_seen := TRUE;
- Reset_F;
-
- END (* Scan_To_Eof *);